﻿using System;
using System.Runtime.Serialization;

namespace Finance.Entites
{
    [DataContract]
    [KnownType(typeof(PayoutCharge))]
    [KnownType(typeof(IncomeCharge))]
    /// <summary>
    /// One charge for one trade, Is the atom of trading active.
    /// </summary>
    public class Charge
    {
        /// <summary>
        /// Amount of this charge
        /// </summary>
        public double Amount { get; set; }

        /// <summary>
        /// Classification of this charge belongs to
        /// </summary>
        public Classification Classification { get; set; }

        public Account Account { get; set; }

        public DateTime Date { get; set; }

        public Project Project { get; set; }

        public string Summary { get; set; }
    }
}
